package net.wanho.shop.mapper;

import net.wanho.shop.po.Category;
import net.wanho.shop.vo.CateGoryVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 分类表 Mapper 接口
 * </p>
 *
 * @author 猛虎王
 * @since 2024-12-24
 */

@Mapper
public interface CategoryMapper {

    List<Category> select(Category category);

    Category selectById(Serializable catId);

    void insert(Category category);

    void update(Category category);

    void deleteById(Serializable catId);

    void deleteByIds(String[] split);

    List<Category> find(Integer type);


    List<CateGoryVo> selectVo(Integer type);

    List<CateGoryVo> findType(int type);

    List<Category> selectChildrenByPid(Integer pId);

    void updateDeleted(List<Integer> deleteList);

    void updateByCatId(@Param("catName") String catName, @Param("catId") Integer catId);
}
